<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>预约通知</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
        }
        .container {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .header {
            background-color: #4285f4;
            color: white;
            padding: 10px 20px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        .content {
            padding: 0 20px;
        }
        .footer {
            margin-top: 30px;
            padding-top: 10px;
            border-top: 1px solid #ddd;
            font-size: 12px;
            color: #777;
        }
        .reservation-info {
            background-color: #f9f9f9;
            padding: 15px;
            border-radius: 4px;
            margin: 20px 0;
        }
        .info-row {
            margin-bottom: 10px;
        }
        .label {
            font-weight: bold;
            margin-right: 10px;
        }
        .button {
            display: inline-block;
            padding: 10px 20px;
            background-color: #4285f4;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            margin-top: 20px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <h2>教室预约通知</h2>
    </div>

    <div class="content">
        <p>尊敬的 <span th:text="${userName}">用户</span>：</p>

        <p>您的教室预约申请<span th:text="${statusText}">已提交</span>。详情如下：</p>

        <div class="reservation-info">
            <div class="info-row">
                <span class="label">预约编号：</span>
                <span th:text="${reservationId}">R12345</span>
            </div>
            <div class="info-row">
                <span class="label">教室：</span>
                <span th:text="${roomName}">主教学楼301</span>
            </div>
            <div class="info-row">
                <span class="label">预约时间：</span>
                <span th:text="${reservationTime}">2023-04-15 10:00-12:00</span>
            </div>
            <div class="info-row">
                <span class="label">预约用途：</span>
                <span th:text="${purpose}">教学活动</span>
            </div>
            <div class="info-row" th:if="${remarks}">
                <span class="label">备注：</span>
                <span th:text="${remarks}">无</span>
            </div>
            <div class="info-row" th:if="${reviewRemarks}">
                <span class="label">审核意见：</span>
                <span th:text="${reviewRemarks}">无</span>
            </div>
        </div>

        <p th:if="${status == 'pending'}">您的预约申请已提交，我们将尽快进行审核，请耐心等待。</p>
        <p th:if="${status == 'approved'}">恭喜！您的预约申请已获批准，请按时使用教室并遵守相关规定。</p>
        <p th:if="${status == 'rejected'}">很抱歉，您的预约申请未获通过，如有疑问请联系管理员。</p>

        <a th:href="${detailUrl}" class="button">查看详情</a>
    </div>

    <div class="footer">
        <p>此邮件由系统自动发送，请勿回复。如有问题，请联系管理员。</p>
        <p>© 2025 教室预约系统 版权所有</p>
    </div>
</div>
</body>
</html>